/**
 * baseUrl: application根路径
 * apiBaseUrl: api根路径
 * routerMode: 路由模式
 *
 */
const isProd = process.env.NODE_ENV === 'production'
let Env = {
  getFullPath(routeTo) {
    if (this.routerMode === 'hash') {
      return this.baseUrl + '#' + routeTo
    }
    return this.baseUrl + routeTo
  }
}

if (isProd) {
  Env.baseUrl = 'https://admin.turnbig.net'
  Env.apiBaseUrl = 'https://api.turnbig.net/api'
  Env.routerMode = 'history'
} else {
  Env.baseUrl = 'http://localhost:8000'
  Env.apiBaseUrl = 'http://localhost:8000/api'
  Env.routerMode = 'history'
}

export default Env
